import ApiClient from '@/http/httpClient'
import { OrderInfoForm, OrderInfoVO } from '@/api/order/orderInfo'
import { LoginData } from '@/api/types'

/**
 * 确认订单
 *
 */
export const confirmOrderApi = async (data: OrderInfoForm) => {
  return await ApiClient.post('/business/order/confirmOrder', { data: data })
}

/**
 * 根据订单id查询订单信息
 */
export const getOrderInfoApi = async (orderId: number) => {
  return await ApiClient.get<OrderInfoVO>(`/business/order/orderInfo?orderId=${orderId}`)
}

/**
 * 查询当前用户的所有订单
 */
export const getMemberOrderInfo = async (memberId: number) => {
  return await ApiClient.get<OrderInfoVO[]>(`/business/order/memberOrder?memberId=${memberId}`)
}
